package cn.fz.relaxation.service.convert;

import cn.fz.relaxation.common.model.dto.HotSearchDTO;
import cn.fz.relaxation.dao.entity.RealxHotSearchDO;

public class HotSearchConvert {
    public static HotSearchDTO toDTOWhenQuery(RealxHotSearchDO realxHotSearchDO){
        return HotSearchDTO.builder()
                // 热搜作者
                .hotSearchAuthor(realxHotSearchDO.getHotSearchAuthor())
                // 热搜作者头像
                .hotSearchAuthorAvatar(realxHotSearchDO.getHotSearchAuthorAvatar())
                // 热搜封面
                .hotSearchCover(realxHotSearchDO.getHotSearchCover())
                // 热度
                .hotSearchHeat(realxHotSearchDO.getHotSearchHeat())
                // 热搜id
                .hotSearchId(realxHotSearchDO.getHotSearchId())
                // 热搜摘要
                .hotSearchExcerpt(realxHotSearchDO.getHotSearchExcerpt())
                // 热搜排序
                .hotSearchOrder(realxHotSearchDO.getHotSearchOrder())
                // 热搜来源
                .hotSearchResource(realxHotSearchDO.getHotSearchResource())
                // 热搜标题
                .hotSearchTitle(realxHotSearchDO.getHotSearchTitle())
                // 热搜链接
                .hotSearchUrl(realxHotSearchDO.getHotSearchUrl())
                // 物理主键
                .id(realxHotSearchDO.getId())
                .build();
    }
}
